project(toft)

cmake_minimum_required(VERSION 3.8)

set(LIB ${CMAKE_CURRENT_SOURCE_DIR}/luaclib)

if(CMAKE_SYSTEM_NAME MATCHES "Windows")
    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${LIB})
    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${LIB})
    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${LIB})
    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${LIB})
    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${LIB})
    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${LIB})
    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${LIB})
    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${LIB})
else()
    set(LIBRARY_OUTPUT_PATH ${LIB})

    if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
        set(CMAKE_MACOSX_RPATH 1)
    endif()
endif()

set(CMAKE_CXX_STANDARD 17)

add_subdirectory(./3rd/aoi)
add_subdirectory(./3rd/navmesh)
add_subdirectory(./hive)